package com.jfeat.am.module.wegou.services.domain.service.impl;

import com.baomidou.mybatisplus.plugins.Page;
import com.jfeat.am.module.wegou.services.domain.dao.QueryProductStoreDao;
import com.jfeat.am.module.wegou.services.domain.model.ProductStoreModel;
import com.jfeat.am.module.wegou.services.domain.service.QueryProductStoreService;
import com.jfeat.am.module.wegou.services.persistence.model.ProductStore;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author admin
 * @since 2017-10-16
 */
@Service
public class QueryProductStoreServiceImpl implements QueryProductStoreService {

    @Resource
    QueryProductStoreDao queryProductStoreDao;

    // 根据 tag 名字 查找 restaurant

    public List<ProductStoreModel> findRestaurantByTag(Page<ProductStoreModel> page,
                                                            ProductStore productRestaurant,
                                                            String tagName,
                                                            String tagZhName) {
        return queryProductStoreDao.findRestaurantByTag(page, productRestaurant, tagName, tagZhName);
    }


    @Override
    public List<ProductStore> findProductRestaurantPage(Page<ProductStore> page, ProductStore productrestaurant) {
        return queryProductStoreDao.findProductRestaurantPage(page, productrestaurant);
    }
}
